<%-- 
    Document   : themdealcontent
    Created on : Oct 11, 2011, 7:30:57 PM
    Author     : Administrator
--%>

<%@page import="java.text.SimpleDateFormat"%>
<%@page import="java.util.List"%>
<%@page import="admin.hibernate.model.dao.AdminLoaiSanPhamDAO"%>
<%@page import="hibernate.pojo.Loaisanpham"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<link type="text/css" rel="stylesheet" href="Admin/calendar/dhtmlgoodies_calendar/dhtmlgoodies_calendar.css"></link>
<script type="text/javascript" src="Admin/calendar/dhtmlgoodies_calendar/dhtmlgoodies_calendar.js"></script>

<form action="admindealprocesscontroller?action=add" method="post" name="frmAddProduct" id="form1">
    <table align="center" width="" border="0" cellspacing="0" cellpadding="0">
        <tr>
            <td colspan="3">THÊM SẢN PHẨM</td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td>Loại Sản Phẩm</td>
            <td><label>
                    <select name="cboLoaiSanPham" id="cboLoaiSanPham">
                        
                        <%
                            SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
                            Loaisanpham category = null;
                            List<Loaisanpham> arrLoaisanpham = (List<Loaisanpham>) request.getAttribute("DanhSachLoaiSanPham");
                            for (int i = 0; i < arrLoaisanpham.size(); i++) {
                                category = arrLoaisanpham.get(i);
                        %>
                        <option value="<%=i + 1%>"> <%=category.getTenLoaiSanPham()%> </option>
                        <%
                            }
                        %>

                    </select>
                </label></td>
        </tr>
        <tr>
            <td>Tên Sản Phẩm</td>
            <td><label>
                    <input type="text" name="txtTenSanPham" id="txtTenSanPham" />
                </label></td>
            <td>Tên Tiêu Đề Sản Phẩm</td>
            <td><label>
                    <input type="text" name="txtTieuDeSanPham" id="txtTieuDeSanPham" />
                </label></td>
        </tr>
        <tr>
            <td>Giá Bán</td>
            <td><label>
                    <input type="text" name="txtGiaBan" id="txtGiaBan" />
                </label></td>
            <td>Trị Giá</td>
            <td><label>
                    <input type="text" name="txtTriGia" id="txtTriGia" />
                </label></td>
        </tr>
        <tr>
            <td>Ngày Bắt Đầu Khuyến Ngày</td>
            <td>
                <table>			
                    <tr>
                        <td>
                            <input type="text" value=""  name="txtNgayBatDauKhuyenMai"/>
                            <input type="button" value="Cal" onclick="displayCalendar(document.forms[0].txtNgayBatDauKhuyenMai,'yyyy-mm-dd hh:ii:00',this,true)"/>
                        </td>
                    </tr>
                </table>
            </td>
            <td>Ngày Kết Thúc Khuyến Mãi</td>
            <td>
                <table>			
                    <tr>
                        <td>
                            <input type="text" value=""  name="txtNgayKetThucKhuyenMai"/>
                            <input type="button" value="Cal" onclick="displayCalendar(document.forms[0].txtNgayKetThucKhuyenMai,'yyyy-mm-dd hh:ii:00',this,true)"/>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td>Thời Gian Khuyến Mãi</td>
            <td><label>
                    <input type="text" name="txtThoiGianKhuyenMai" id="txtThoiGianKhuyenMai" />
                </label></td>
        </tr>
        <tr>
            <td>Ảnh Sản Phẩm</td>
            <td>
                <input type="text" name="fileUploadAnh" value="" />
                <input type="button" name="button" id="button" value="Chọn Ảnh" onClick="window.open('adminuploadfilecontroller?action=viewupload','mywindow','width=500,height=220')" />
            </td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td>Ghi Chú</td>
            <td colspan="3"><label>
                    <textarea name="txtGhiChu" id="txtaGhiChu" cols="45" rows="5"></textarea>
                </label></td>
        </tr>
        <tr>
            <td colspan="4"><label>
                    <input type="submit" name="Submit" id="button" value="Thêm Sản Phẩm" />
                    <input type="reset" name="button2" id="button2" value="Nhập Lại" />
                </label></td>
        </tr>
    </table>
</form>